Apparatus for dynamically determining primary adapter in a heterogeneous n-way adapter configuration

ABSTRACT

A method and apparatus are provided for dynamically determining a primary adapter in a heterogeneous N-way adapter configuration. Each of the adapters generates information about itself and exchanges the information with all other adapters. First a decision-making adapter is identified. Then the decision-making adapter compares the adapter-generated information of all the adapters and makes a decision determining the primary adapter. The decision-making adapter communicates the decision to all other adapters. The determined primary adapter assumes a role as the primary adapter and the other adapters assume a role as a secondary adapter.

FIELD OF THE INVENTION

The present invention relates generally to the data processing field,and more particularly, relates to a method and apparatus for dynamicallydetermining a primary adapter in a heterogeneous N-way adapterconfiguration.

DESCRIPTION OF THE RELATED ART

A need exists for an effective mechanism for making an optimumdetermination of which adapter should be the primary adapter. Thisproblem is further complicated when the adapters do not have identicalcapabilities or features.

Prior solutions have typically avoided the worst aspects of the problemby requiring the adapters to have like features and matchedimplementations. Both adapters then perform an identical decision makingprocess so that they come to the same conclusion with respect to whichadapter is primary and which is secondary.

The prior art solution makes it very difficult to make changes, forexample, either to add features or fix design flaws, because theadapters always are required to be in synchronization.

BRIEF SUMMARY OF THE INVENTION

A principal aspect of the present invention is to provide a method andapparatus for dynamically determining a primary adapter in aheterogeneous N-way adapter configuration. Other important aspects ofthe present invention are to provide such method and apparatus fordynamically determining a primary adapter in a heterogeneous N-wayadapter configuration substantially without negative effect and thatovercome many of the disadvantages of prior art arrangements.

In brief, a method and apparatus are provided for dynamicallydetermining a primary adapter in a heterogeneous N-way adapterconfiguration. Each of the adapters generates information about itselfand exchanges the information with all other adapters. First adecision-making adapter is identified. Then the decision-making adaptercompares the adapter-generated information of all the adapters and makesa decision determining the primary adapter. The decision-making adaptercommunicates the decision to all other adapters. The determined primaryadapter assumes a role as the primary adapter and the other adaptersassume a role as a secondary adapter.

In accordance with features of the invention, the adapter-generatedinformation includes vital product data (VPD), a scalar value, and aprior adapter role. The decision-making adapter is identified based uponvital product data (VPD) for each of the adapters.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention together with the above and other objects andadvantages may best be understood from the following detaileddescription of the preferred embodiments of the invention illustrated inthe drawings, wherein:

FIG. 1 is a block diagram of an exemplary system for implementingmethods for dynamically determining a primary adapter in a heterogeneousN-way adapter configuration in accordance with the preferred embodiment;

FIG. 2 is a flow chart illustrating exemplary sequential operations fordynamically determining a primary adapter in a heterogeneous N-wayadapter configuration in accordance with the preferred embodiment; and

FIG. 3 is a flow chart illustrating exemplary steps of a decisionalgorithm routine of the overall flow chart of FIG. 2 in accordance withthe preferred embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Referring now to the drawings, in FIG. 1 there is shown an exemplarymultiple adapter system generally designated by the reference character100 for implementing methods for dynamically determining a primaryadapter in a heterogeneous N-way adapter configuration in accordancewith the preferred embodiment. System 100 includes a plurality of hostcomputer systems 1-3, 102. Each of the host computer systems 1-3, 102includes one or more adapters A, B, C, D, 104. Each of the adapters A,B, C, D, 104 is coupled to a communication network 106. System 100includes a plurality of devices X, Y, Z, 108 connected to thecommunication network 106. Each of the adapters A, B, C, D, 104 iscapable of reaching all of the devices X, Y, Z, 108.

It should be understood that the present invention is not limited to theillustrated system 100, the present invention can be used with variousimplementations. For example, a simpler example system configurationwould include two host computer systems 1-2,102, each with a singleadapter 104 attached, and the communication network 106 being a parallelSCSI bus or a serial attached SCSI (SAS) domain.

It should be understood that the present invention applies to I/Oadapters 104 connected in the following type of high availability (HA)configuration. Both adapters 104 are connected to the same set of diskdrives. Both adapters 104 support and use RAID, such as RAID-5, RAID-6,and/or RAID-10, to form RAID arrays. One adapter 104, at any point intime, is designated to be the primary adapter, for example, adapter B,104. Then other adapters A, C, D, 104 are designed to be secondaryadapters. Primary and secondary adapters 104 can and do exist indifferent host systems 102, or logical partitions of a system. Bothprimary and secondary adapters 104 show the same RAID arrays to theirhost systems. The primary adapter 104 actually controls the RAID arraysand associated disks. The secondary adapters 104 forward commands, suchas Reads and Writes, to the primary adapter for processing. If a primaryadapter 104 fails or is powered off, then a secondary adapter 104 takesover the role of primary adapter.

In accordance with features of the preferred embodiment, two coreaspects of the invention lead to advantages achieved. The first aspectis a two step decision making process. This breaks the determination ofwhich adapter A, B, C, D, 104 is to be primary and which is to besecondary into two phases. In the first phase the adapters A, B, C, D,104 exchange information and identify an adapter which will beresponsible for making the decision. In the second phase, the identifiedadapter in phase one uses the information exchanged to determine whichadapter A, B, C, D, 104 will become primary and the other adapters willbecome secondary. This decision is then communicated to the otheradapters. Note that the decision is made wholly by a single adapter 104,and must be adhered to by the other adapters even if another adaptermight not have made the same decision.

The second aspect is that one of the key pieces of data exchanged by theadapters A, B, C, D, 104 is an encoded value which quantitativelydenotes how much that adapter desires to become the primary adapter. Theadapter that makes the primary adapter decision, compares the valuescomputed for itself and received from each the other adapters. Basedupon the compared values, the adapter then makes a decision as to whichadapter is to become the primary adapter and communicates the decisionto the other adapters. In accordance with features of the preferredembodiment, each adapter has a common understanding of how to comparethe other adapter's value against its own, but each adapter may havedifferent algorithms to determine the setting of the value. Thecomparison process is described further below and is illustrated anddescribed with respect to FIG. 3.

In accordance with features of the preferred embodiments, heterogeneousadapters 104 are supported. One example of a heterogeneous adapterconfiguration is that a generation-one adapter is allowed to mate with ageneration-two adapter even though the generation-two adapter maysupport functions not understood by the generation-one adapter. Thegeneration-one adapter still is capable of making the proper decisioneven though the generation-one adapter does not understand thegeneration-two features because the decision is based on the exchange ofencoded values generated by each adapter. This provides significantbenefits to the customer and vendor because it allows significantlygreater configuration options and allows the vendor to reduce the numberof parts held in field stock as replacements because a single part canserve as a replacement for many different adapters.

In accordance with features of the preferred embodiments, only oneadapter 104 makes the decision, so the decision algorithms between apair of adapters are allowed to be different. This is an advantage, forexample, if an improved algorithm is discovered because the algorithmmay be implemented immediately without requiring a guarantee for alladapters to be updated. This is true for both the determination of theencoded values and for the algorithm used by the decision making adapterto compare those values.

In accordance with features of the preferred embodiments, the primaryadapter 104 may be changed, for example, upon late arrival of the secondadapter when the benefits of the change are sufficient to overcome themomentary disruption involved in making the change. This is tunablebased on the potential benefits gained in availability of performance.For example, the second adapter 104 may contain hardware acceleration ofsome feature that is implemented in firmware by the first adapter, andthe system would achieve significant performance benefits by changingthe primary adapter to be the second adapter. An old adapter that doesnot understand the functions/features provided by the new adapter, forexample, is unaware of the possibility of hardware acceleration, isstill able to make the optimum determination if the old adapter iselected to make the decision because of how the new adapter encoded thevalue of its characteristics in the information exchanged betweenadapters.

In accordance with features of the preferred embodiments, this solutionfor dynamically determining a primary adapter is amenable to looselycoupled configurations, for example, in location and power domains,where system packaging cannot be used to aid in decision making process;as opposed to a system where one might otherwise be able to use locationinformation, for instance, to help determine which adapter will becomethe primary adapter.

In accordance with features of the preferred embodiments, this solutionfor dynamically determining a primary adapter readily extends fromconfigurations containing two adapters into configurations containing Nadapters.

In accordance with features of the preferred embodiments, a sequence ofactions is provided which the adapters 104 take to determine whichadapter is primary and which is secondary. This sequence is repeatedeach time a new adapter joins the configuration or if the adaptercurrently serving as the primary adapter leaves the configuration. Eachof the steps is illustrated and described with respect to FIG. 2.

Referring now to FIG. 2, there are shown exemplary sequential operationsfor dynamically determining a primary adapter in a heterogeneous N-wayadapter configuration in accordance with the preferred embodimentstarting at a block 200. The exemplary steps are:

a. Calculation and exchange of information between adapters 104. Eachadapter 104 generates information about itself and exchanges theinformation with all other adapters as indicated in a block 202.

b. Determination of which adapter will make the decision on theassignment of primary/secondary adapter roles. Each adapter 104determines if it is the decision-making adapter as indicated in a block204 and is identified as indicated in a decision block 206.

c. Adapter 104 elected in prior step looks at information exchanged, andmakes decision of which adapter will become the primary adapter. Thedecision-making adapter identified at decision block 206, executes adecision algorithm routine as indicated in a block 208.

d. Adapter which made the decision communicates it to the otheradapters. Responsive to executing the decision algorithm routine atblock 208, the decision-making adapter communicates the decision to allother adapters as indicated in a block 210. The other adapters wait toreceive the decision as indicated in a block 212 and receive thedecision from the decision-making adapter as indicated in a block 214.

e. The adapter assumes their new roles. As indicated in a block 216, theadapters 104 assume new role as primary or secondary adapter. Thiscompletes the sequential steps as indicated in a block 218.

Step a. Calculation and Exchange of Information Between Adapters

Each adapter 104 independently generates a set of information aboutitself and communicates it to the other adapters at block 202. The setof adapters present can be determined, for instance, by a sweep of thenetwork fabric 106.

One type of information included is vital product data (VPD) and primaryor secondary adapter state. The VPD includes items such as the modelnumber of the adapter, the serial number of the adapter, and the currentlevel of the firmware executing on the adapter. The primary or secondaryadapter state communicates whether or not this adapter is currently theprimary adapter, currently a secondary adapter, or currently acting as astandalone adapter where it has not previously seen another adapter tomate with since being last reset. This type of information iscommunicated between the adapters in a fixed format, and the formatremains fixed over time.

The second type of information is a set of self-defining informationfields that communicate characteristics of the adapters 104. This is avariable length list which each adapter can walk to determine additionalcharacteristics of the other adapters. These characteristics mightinclude things such as the amount of memory on the adapter 104, theperformance level of the adapter, presence or absence of hardwareacceleration, and support for optional features. The contents of thisinformation will vary over time. This is acceptable since thisinformation is not required to be used to decide which adapter 104 willmake the primary/secondary decision, and is not required to be used toactually make the primary/secondary decision. Instead this informationis informational only.

The third type of information is an encoded scalar value that indicatesthe relative desire of this adapter 104 to become the primary adapter. Ahigher value indicates a greater desire to become the primary adapter. Alower value indicates a lesser desire, or a desire not to become theprimary adapter. Several considerations are taken into account whendetermining this value. One is the current and previous states of theadapter 104, for example, whether or not the adapter is the primaryadapter. Another is the feature level of the adapter where greatercapabilities, such as larger amounts of memory, hardware acceleration ofsome features, or a more recent firmware level leads to a greater value.A third might be the presence or absence of nonvolatile data such ascache data or parity update footprints for the RAID arrays. A fourthcould be related to availability aspects such that an adapter that isexperiencing a fault such that it is not able to see some of the devicescould present a lower non-optimum functionality. A fifth could indicatewhether or not the host system 102 has expressed a desire for thisadapter 104 to be the primary adapter is possible as it might desire tosimplify configuration management. All of these items are weightedaccording to this adapter's policy and combined into the scalar valueindicating the relative desire of this adapter 104 to become the primaryadapter. The two or more adapters 104 need not have the same policy forcalculating the scalar value which allows for changes and enhancementsto be made over time without requiring changes to existing adapters;however, the adapters 104 do need to share some general level ofunderstanding on the meaning of the value.

An example implementation for computing the scalar value follows. Thescalar is a 32 bit value with a Default value of 0×000000FF and a Changevalue of 0×00FFFFFF (the significance of default and change areelaborated upon in step c). The steps in computing the value are:

1. Initialize scalar to Default value.

2. OR in (via bitwise OR operation, resulting in a higher scalar value)the following positive attributes:

If the adapter has a condition for which it temporarily desires to bethe primary adapter such as an knowledge that it has better than averageconnectivity to the devices present given the known system failures,then OR with 0×08000000.

If the adapter has been directed by the host system to be the primaryadapter, then OR with 0×01000000.

If the adapter was previously declared a primary adapter during the lastexecution of the decision algorithm, then OR with 0×000040000.

3. AND out (via a bitwise AND operation, resulting in a lower scalarvalue) the following negative attributes:

If the adapter requires cache data for some devices present, then ANDwith 0×00000020.

If the adapter does not support an attribute (for example, a given RAIDlevel) for some devices present, then AND with 0×00000010.

If some of the devices present require footprints for in process RAIDupdates, then AND with 0×00000008.

Step b. Determination of Which Adapter will Make the Decision on theAssignment of Primary/Secondary Adapter Roles

The determination of which adapter 104 will make the decision at block204 is based solely upon the VPD contained in the information exchangedbetween the multiple N adapters. This determination can be as simple asa comparison of the model/serial numbers to elect the adapter 104 withthe highest number. This determination is very simple and remains fixedover time; that is, all new adapters will also follow the samedetermination. The purpose of this determination is to elect a singleadapter 104 to make the decision of which adapter will become primaryand which adapters will become secondary. By guaranteeing only a singleadapter 104 makes the decision, which is adhered to by all adapters,then the decision-making algorithm is allowed to change over time. Forexample, a change to an improved decision-making algorithm can correctflaws in the original algorithm or include additional features to a newadapter type that changes the preferred decision.

Step c. Decision-Making Adapter Looks at Information Exchanged, andMakes Decision of Which Adapter Will Become the Primary Adapter

In the decision algorithm executed at block 208 of FIG. 2 to determinewhich adapter 104 will be the primary adapter, there are two conflictingissues for the decision. The first issue is the desire to minimizedisruption, so that the host systems 102 will not unnecessarily beimpacted by a change of which adapter 104 is primary. The second issueis the desire to end with the best possible configuration with respectto availability, performance, and maintenance concerns. The data used tomake the decision includes the current adapter states and the respectivescalar values generated by each of the adapters 104. In thedecision-making process, the scalar values are compared against twovalues, a Change value, and a Default value. An adapter 104 generating avalue higher than the Change value is indicating that this adaptershould become the primary adapter even at the expense of a momentarydisruption during the configuration change. An adapter 104 generating avalue lower than the Default value is indicating that this adaptershould not become the primary adapter

Referring also to FIG. 3, there are exemplary steps of the decisionalgorithm executed at block 208 of FIG. 2 starting at a block 300. Twoadapters 104 are selected for comparison as indicated in a block 302.The selected adapters 104 are compared using the scalar values, prioradapter role, and a decision-making table as indicated in a block 304.One adapter is marked as a secondary adapter and the other adapter isprovisionally marked as the primary adapter as indicated in a block 306.Checking for another adapter to be evaluated is performed as indicatedin a decision block 308. If so, then another adapter is selected forcomparison with the current provisional primary adapter as indicated ina block 310. Then the adapter are compared using the scalar values,prior adapter role, and a decision-making table at block 304. When thereis no further adapter to be evaluated, then the current provisionalprimary adapter is marked as the primary adapter as indicated in a block312. This completes the sequential steps as indicated in a block 314.

The following TABLE 1 describes an exemplary decision tree thatdetermines which adapter is primary based upon these factors. Since onlya single adapter 104 executes this algorithm, the algorithm can bechanged as needed without impacting existing adapters. The treatment ofan adapter currently acting as a secondary adapter follows the treatmentof a standalone adapter in table 1.

TABLE 1 Decision Factors Decision State of State of Scalar ScalarGreater Adapter Adapter value of value of scaler Primary Secondary A BAdapter A Adapter B value Adapter Adapter Primary Stand- Any Any A A Balone Primary Stand- Any Any A = B A B alone Primary Stand- Any ExceedsB B A alone Change Primary Stand- Exceeds Less than B A B alone or equalto or equal to Default, Change Less than or equal to Change PrimaryStand- Less than Less than B B A alone Default or equal to Change,Exceeds or equal to Default Primary Stand- Less than Less than B A Balone Default Default Stand- Primary Any Any B B A alone Stand- PrimaryAny Any A = B B A alone Stand- Primary Exceeds Any A A B alone ChangeStand- Primary Less than Exceeds A B A alone or equal to Default, Changeless than or equal to Change Stand- Primary Less than Less than A A Balone or equal to Default Change, Exceeds or equal to Default Stand-Primary Less than Less than A B A alone Default Default Stand- Stand-Any Any A A B alone alone Stand- Stand- Any Any A = B A B alone alonealone alone Stand- Stand- Any Any B B A alone alone Primary Primary AnyAny A A B Primary Primary Any Any A = B A B Primary Primary Any Any B BAStep d. Adapters Which Made the Decision to Communicates it to the OtherAdapter

The decision is communicated to the other adapters at block 210 of FIG.2.

Step e. The Adapters Assume Their New Roles

Each adapter 104 now assumes its new role as primary or secondaryadapter at block 216 of FIG. 2. This might require one of the adapters104 to relinquish a role as a primary adapter and become the secondaryadapter. All adapters are required to comply with decision received evenif they may disagree with it. This is a key point which allows thedecision making process to change over time. If the adaptersindependently made the decision then they must be guaranteed to alwayscome to the same conclusion. This effectively precludes the ability toadd new features or to change the decision making algorithm if animproved algorithm is discovered because of the existence of otheradapters which would not contain the new algorithm or understand how totreat the new features.

While the present invention has been described with reference to thedetails of the embodiments of the invention shown in the drawing, thesedetails are not intended to limit the scope of the invention as claimedin the appended claims.

1-13. (canceled)
 14. Apparatus for dynamically determining a primaryadapter in a heterogeneous N-way adapter configuration comprising: aplurality of adapters connected to a communication network, each saidadapter generating information about itself including providing vitalproduct data (VPD); said VPD including a predefined model number of theadapter and a current level of the firmware executing on the adapter;and generating a scalar value, said scalar value indicating a capabilityof the adapter; each of the adapters exchanging the adapter-generatedinformation including said VPD with all other adapters and each of theadapters utilizing the exchanged information including said VPD andidentifying a decision-making adapter of the plurality of adapters; saididentified decision-making adapter comparing the adapter-generatedinformation of each of the adapters and making a decision determiningthe primary adapter; said identified decision-making adapter notifyingall other adapters of said determined primary adapter; and saiddetermined primary adapter assuming a role as the primary adapter andthe other adapters assuming a role as a secondary adapter. 15.(canceled)
 16. Apparatus for dynamically determining a primary adapteras recited in claim 14 wherein each said adapter generates informationabout itself including a prior adapter role.
 17. Apparatus fordynamically determining a primary adapter as recited in claim 14 whereineach said adapter identifies said decision-making adapter based uponvital product data (VPD) of each of the plurality of adapters. 18.Apparatus for dynamically determining a primary adapter as recited inclaim 14 wherein said identified decision-making adapter compares aprior adapter role included in the adapter-generated information of eachof the adapters for making the decision determining the primary adapter.19. Apparatus for dynamically determining a primary adapter as recitedin claim 14 wherein said identified decision-making adapter compares anencoded scalar value included in the adapter-generated information ofeach of the adapters for making the decision determining the primaryadapter.
 20. Apparatus for dynamically determining a primary adapter asrecited in claim 14 wherein said encoded scalar value is generated byeach said adapter for indicating a capability about the adapter; whereinsaid encoded scalar value greater than a default value provides apositive factor for selecting the adapter as the primary adapter; andwherein said encoded scalar value less than a change value provides anegative factor for not selecting the adapter as the primary adapter.